﻿@model BugTracker.Models.User

@{
    ViewBag.Title = "Create User";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}


<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/EditorHookup.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
<fieldset>
        
<br />
   <div class="display-label"><b>Username:</b></div>
   <div class="editor-field">
            @Html.EditorFor(model => model.user_name)
            @Html.ValidationMessageFor(model => model.user_name)
   </div>

<br />
    <div class="display-label"><b>Password:</b></div>
    <div class="editor-field">
            @Html.EditorFor(model => model.password)
            @Html.ValidationMessageFor(model => model.password)
   </div>

<br />
    <div class="display-label"><b>First Name:</b></div>
    <div class="editor-field">
            @Html.EditorFor(model => model.first_name)
            @Html.ValidationMessageFor(model => model.first_name)
   </div>

<br />
    <div class="display-label"><b>Last Name:</b></div>
    <div class="editor-field">
            @Html.EditorFor(model => model.last_name)
            @Html.ValidationMessageFor(model => model.last_name)
   </div>

<br />
   <div>
        Role :  &nbsp; @Html.DropDownListFor(model => model.role_idFK,
                        new SelectList(ViewData["role_idPK"] as System.Collections.IEnumerable,
                        "role_idPK", "role_name"))
<br />   
   </div>
   
<br />
        <p>
            <input type="submit" value="Add User" />
        </p>
      
<div>
       @Html.ActionLink("Back to Users", "DeleteUser")
</div>

<br />
<br />

</fieldset> 
}